

<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
    <style>
    /* base */
    html,
    body,
    .container {
      width: 100%;
      height: 100%;
    }

    a,
    a:link,
    a:visited {
      text-decoration: none;
      color: inherit;
    }

    ul {
      list-style: none;
    }

    *,
    ::before,
    ::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    *:focus {
      outline: 0;
    }

    .container {
      display: flex;
      padding-top: 20px;
    }

    /* Nav */
    .container .doc-nav {
      position: fixed;
      height: 100%;
      margin: 0 30px 0 40px;
      width: 280px;
    }

    .doc-nav .nav-header {
      display: flex;
      align-items: center;
      box-sizing: border-box;
      background-color: rgb(240, 241, 242);
      height: 40px;
      padding: 16px;
      font-size: 18px;
      font-weight: 500;
      color: rgb(62, 64, 66);
      cursor: pointer;
    }

    .doc-nav .nav-content {
      height: calc(100% - 40px);
      overflow-y: auto;
      color: rgb(32, 34, 36);
    }

    .doc-nav .nav-content .nav-list,
    .doc-nav .nav-content .nav-sub-list {
      line-height: 1.5rem;
    }

    .doc-nav .nav-content .nav-label {
      display: inline-block;
      position: relative;
      padding: 2px 0 2px 20px;
      margin-bottom: 4px;
    }

    .doc-nav .nav-content .nav-sub-label {
      position: relative;
      padding: 2px 0 2px 40px;
      font-size: 14px;
    }

    .doc-nav .nav-content .nav-sub-label:hover {
      text-decoration: underline;
    }

    .doc-nav .nav-content .nav-list .nav-label.group::before {
      border-bottom: 0.25rem solid transparent;
      border-left: 0.25rem solid #6e7072;
      border-right: 0;
      border-top: 0.25rem solid transparent;
      content: '';
      display: block;
      height: 0;
      left: 0.5rem;
      position: absolute;
      top: 0.625rem;
      transition: transform 0.1s linear;
      width: 0;
    }

    .doc-nav .nav-content .nav-list .nav-label.group.active::before {
      transform: rotate(90deg);
    }

    /* doc content */
    .container .doc-content {
      position: fixed;
      height: 100%;
      width: calc(100% - 80px - 40px - 30px - 240px);
      right: 0%;
      overflow-y: auto;
    }

    .doc-title {
      border-bottom: 1px solid #dcdee0;
      font-size: 22px;
      margin: 8px 0 0;
      padding-bottom: 16px;
    }

    .doc-content h3 {
      font-size: 24px;
      font-weight: 600;
      margin: 24px 0;
    }

    .doc-content h4 {
      font-size: 22px;
      font-weight: 500;
      margin: 30px 0 8px;
    }

    .doc-content h4 span {
      color: #007d9c;
    }

    .doc-content .doc-declare {
      background-color: #fafafa;
      border-radius: 5px;
      border: 1px solid #ccc;
      font-size: 14px;
      overflow-x: auto;
      padding: 10px;
      tab-size: 4;
      line-height: 20px;
    }

    .doc-content .doc-comment {
      font-size: 16px;
      margin: 16px 0;
      line-height: 24px;
      word-break: break-word;
    }
  </style>

</head>
<body>
  <div class="container">
    <div class="doc-nav">
      <a href="#Documentation" class="nav-header">Documentation</a>
      <nav class="nav-content">
        <ul class="nav-list">
          <li>
            <a href="#includes" class="nav-label">Includes</a>
             
            <ul class="nav-sub-list">

              <li>
                <a href="#config.h" class="nav-sub-label">config.h</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_CONFIG_FILE" class="nav-sub-label">MBEDTLS_CONFIG_FILE</a>
              </li>
      

              <li>
                <a href="#md.h" class="nav-sub-label">md.h</a>
              </li>
      

              <li>
                <a href="#rsa.h" class="nav-sub-label">rsa.h</a>
              </li>
      

              <li>
                <a href="#ecp.h" class="nav-sub-label">ecp.h</a>
              </li>
      

              <li>
                <a href="#ecdsa.h" class="nav-sub-label">ecdsa.h</a>
              </li>
      
            </ul>
            
          </li>
          <li>
            <a href="#macros" class="nav-label">Macros</a>
             
            <ul class="nav-sub-list">

              <li>
                <a href="#MBEDTLS_PK_H" class="nav-sub-label">MBEDTLS_PK_H</a>
              </li>
      

              <li>
                <a href="#inline" class="nav-sub-label">inline</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ERR_PK_ALLOC_FAILED" class="nav-sub-label">MBEDTLS_ERR_PK_ALLOC_FAILED</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ERR_PK_TYPE_MISMATCH" class="nav-sub-label">MBEDTLS_ERR_PK_TYPE_MISMATCH</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ERR_PK_BAD_INPUT_DATA" class="nav-sub-label">MBEDTLS_ERR_PK_BAD_INPUT_DATA</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ERR_PK_FILE_IO_ERROR" class="nav-sub-label">MBEDTLS_ERR_PK_FILE_IO_ERROR</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ERR_PK_KEY_INVALID_VERSION" class="nav-sub-label">MBEDTLS_ERR_PK_KEY_INVALID_VERSION</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ERR_PK_KEY_INVALID_FORMAT" class="nav-sub-label">MBEDTLS_ERR_PK_KEY_INVALID_FORMAT</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ERR_PK_UNKNOWN_PK_ALG" class="nav-sub-label">MBEDTLS_ERR_PK_UNKNOWN_PK_ALG</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ERR_PK_PASSWORD_REQUIRED" class="nav-sub-label">MBEDTLS_ERR_PK_PASSWORD_REQUIRED</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ERR_PK_PASSWORD_MISMATCH" class="nav-sub-label">MBEDTLS_ERR_PK_PASSWORD_MISMATCH</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ERR_PK_INVALID_PUBKEY" class="nav-sub-label">MBEDTLS_ERR_PK_INVALID_PUBKEY</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ERR_PK_INVALID_ALG" class="nav-sub-label">MBEDTLS_ERR_PK_INVALID_ALG</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ERR_PK_UNKNOWN_NAMED_CURVE" class="nav-sub-label">MBEDTLS_ERR_PK_UNKNOWN_NAMED_CURVE</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ERR_PK_FEATURE_UNAVAILABLE" class="nav-sub-label">MBEDTLS_ERR_PK_FEATURE_UNAVAILABLE</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ERR_PK_SIG_LEN_MISMATCH" class="nav-sub-label">MBEDTLS_ERR_PK_SIG_LEN_MISMATCH</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ERR_PK_HW_ACCEL_FAILED" class="nav-sub-label">MBEDTLS_ERR_PK_HW_ACCEL_FAILED</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_PK_DEBUG_MAX_ITEMS" class="nav-sub-label">MBEDTLS_PK_DEBUG_MAX_ITEMS</a>
              </li>
      
            </ul>
            
          </li>
          <li>
            <a href="#functions" class="nav-label">Functions</a>
             
            <ul class="nav-sub-list">

              <li>
                <a href="#mbedtls_pk_init" class="nav-sub-label">mbedtls_pk_init</a>
              </li>
      

              <li>
                <a href="#mbedtls_pk_free" class="nav-sub-label">mbedtls_pk_free</a>
              </li>
      

              <li>
                <a href="#mbedtls_pk_restart_init" class="nav-sub-label">mbedtls_pk_restart_init</a>
              </li>
      

              <li>
                <a href="#mbedtls_pk_restart_free" class="nav-sub-label">mbedtls_pk_restart_free</a>
              </li>
      

              <li>
                <a href="#mbedtls_pk_setup" class="nav-sub-label">mbedtls_pk_setup</a>
              </li>
      

              <li>
                <a href="#mbedtls_pk_setup_rsa_alt" class="nav-sub-label">mbedtls_pk_setup_rsa_alt</a>
              </li>
      

              <li>
                <a href="#mbedtls_pk_get_bitlen" class="nav-sub-label">mbedtls_pk_get_bitlen</a>
              </li>
      

              <li>
                <a href="#mbedtls_pk_can_do" class="nav-sub-label">mbedtls_pk_can_do</a>
              </li>
      

              <li>
                <a href="#mbedtls_pk_verify" class="nav-sub-label">mbedtls_pk_verify</a>
              </li>
      

              <li>
                <a href="#mbedtls_pk_verify_restartable" class="nav-sub-label">mbedtls_pk_verify_restartable</a>
              </li>
      

              <li>
                <a href="#mbedtls_pk_verify_ext" class="nav-sub-label">mbedtls_pk_verify_ext</a>
              </li>
      

              <li>
                <a href="#mbedtls_pk_sign" class="nav-sub-label">mbedtls_pk_sign</a>
              </li>
      

              <li>
                <a href="#mbedtls_pk_sign_restartable" class="nav-sub-label">mbedtls_pk_sign_restartable</a>
              </li>
      

              <li>
                <a href="#mbedtls_pk_decrypt" class="nav-sub-label">mbedtls_pk_decrypt</a>
              </li>
      

              <li>
                <a href="#mbedtls_pk_encrypt" class="nav-sub-label">mbedtls_pk_encrypt</a>
              </li>
      

              <li>
                <a href="#mbedtls_pk_check_pair" class="nav-sub-label">mbedtls_pk_check_pair</a>
              </li>
      

              <li>
                <a href="#mbedtls_pk_debug" class="nav-sub-label">mbedtls_pk_debug</a>
              </li>
      

              <li>
                <a href="#mbedtls_pk_parse_key" class="nav-sub-label">mbedtls_pk_parse_key</a>
              </li>
      

              <li>
                <a href="#mbedtls_pk_parse_public_key" class="nav-sub-label">mbedtls_pk_parse_public_key</a>
              </li>
      

              <li>
                <a href="#mbedtls_pk_parse_keyfile" class="nav-sub-label">mbedtls_pk_parse_keyfile</a>
              </li>
      

              <li>
                <a href="#mbedtls_pk_parse_public_keyfile" class="nav-sub-label">mbedtls_pk_parse_public_keyfile</a>
              </li>
      

              <li>
                <a href="#mbedtls_pk_write_key_der" class="nav-sub-label">mbedtls_pk_write_key_der</a>
              </li>
      

              <li>
                <a href="#mbedtls_pk_write_pubkey_der" class="nav-sub-label">mbedtls_pk_write_pubkey_der</a>
              </li>
      

              <li>
                <a href="#mbedtls_pk_write_pubkey_pem" class="nav-sub-label">mbedtls_pk_write_pubkey_pem</a>
              </li>
      

              <li>
                <a href="#mbedtls_pk_write_key_pem" class="nav-sub-label">mbedtls_pk_write_key_pem</a>
              </li>
      

              <li>
                <a href="#mbedtls_pk_parse_subpubkey" class="nav-sub-label">mbedtls_pk_parse_subpubkey</a>
              </li>
      

              <li>
                <a href="#mbedtls_pk_write_pubkey" class="nav-sub-label">mbedtls_pk_write_pubkey</a>
              </li>
      

              <li>
                <a href="#mbedtls_pk_load_file" class="nav-sub-label">mbedtls_pk_load_file</a>
              </li>
      
            </ul>
            
          </li>
          <li>
            <a href="#vars" class="nav-label">Vars</a>
             
            <ul class="nav-sub-list">

              <li>
                <a href="#mbedtls_pk_type_t" class="nav-sub-label">mbedtls_pk_type_t</a>
              </li>
      
            </ul>
            
          </li>
          <li>
            <a href="#consts" class="nav-label">Consts</a>
             
            <ul class="nav-sub-list">

              <li>
                <a href="# " class="nav-sub-label"> </a>
              </li>
      

              <li>
                <a href="# " class="nav-sub-label"> </a>
              </li>
      
            </ul>
            
          </li>
          <li>
            <a href="#types" class="nav-label">Types</a>
            
            <ul class="nav-sub-list">
            
            </ul>
            
          </li>
          <li>
            <a href="#typedefs" class="nav-label">Typedefs</a>
             
            <ul class="nav-sub-list">

              <li>
                <a href="#mbedtls_pk_type_t;
" class="nav-sub-label">mbedtls_pk_type_t;
</a>
              </li>
      

              <li>
                <a href="#mbedtls_pk_rsassa_pss_options;
" class="nav-sub-label">mbedtls_pk_rsassa_pss_options;
</a>
              </li>
      

              <li>
                <a href="#mbedtls_pk_debug_type;
" class="nav-sub-label">mbedtls_pk_debug_type;
</a>
              </li>
      

              <li>
                <a href="#mbedtls_pk_debug_item;
" class="nav-sub-label">mbedtls_pk_debug_item;
</a>
              </li>
      

              <li>
                <a href="#mbedtls_pk_info_t" class="nav-sub-label">mbedtls_pk_info_t</a>
              </li>
      

              <li>
                <a href="#mbedtls_pk_context;
" class="nav-sub-label">mbedtls_pk_context;
</a>
              </li>
      

              <li>
                <a href="#mbedtls_pk_restart_ctx;" class="nav-sub-label">mbedtls_pk_restart_ctx;</a>
              </li>
      

              <li>
                <a href="#mbedtls_pk_rsa_alt_decrypt_func" class="nav-sub-label">mbedtls_pk_rsa_alt_decrypt_func</a>
              </li>
      

              <li>
                <a href="#mbedtls_pk_rsa_alt_sign_func" class="nav-sub-label">mbedtls_pk_rsa_alt_sign_func</a>
              </li>
      

              <li>
                <a href="#size_t" class="nav-sub-label">size_t</a>
              </li>
      
            </ul>
            
          </li>
        </ul>
      </nav>
    </div>
    <div class="doc-content">
      <h2 id="Documentation" class="doc-title">Documentation</h2>
      <h3 id="includes">Includes</h3>
      

      <h4 id="config.h"><span>config.h</span></h4>
      <pre class="doc-declare"><code>#include "config.h"
</code></pre>
      <pre class="doc-comment">#include "config.h"
</pre>

      <h4 id="MBEDTLS_CONFIG_FILE"><span>MBEDTLS_CONFIG_FILE</span></h4>
      <pre class="doc-declare"><code>#include MBEDTLS_CONFIG_FILE
</code></pre>
      <pre class="doc-comment">#include MBEDTLS_CONFIG_FILE
</pre>

      <h4 id="md.h"><span>md.h</span></h4>
      <pre class="doc-declare"><code>#include "md.h"
</code></pre>
      <pre class="doc-comment">#include "md.h"
</pre>

      <h4 id="rsa.h"><span>rsa.h</span></h4>
      <pre class="doc-declare"><code>#include "rsa.h"
</code></pre>
      <pre class="doc-comment">#include "rsa.h"
</pre>

      <h4 id="ecp.h"><span>ecp.h</span></h4>
      <pre class="doc-declare"><code>#include "ecp.h"
</code></pre>
      <pre class="doc-comment">#include "ecp.h"
</pre>

      <h4 id="ecdsa.h"><span>ecdsa.h</span></h4>
      <pre class="doc-declare"><code>#include "ecdsa.h"
</code></pre>
      <pre class="doc-comment">#include "ecdsa.h"
</pre>
      <h3 id="macros">Macros</h3>
      

      <h4 id="MBEDTLS_PK_H">Marco <span>MBEDTLS_PK_H</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_PK_H
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="inline">Marco <span>inline</span></h4>
      <pre class="doc-declare"><code>#define inline __inline
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ERR_PK_ALLOC_FAILED">Marco <span>MBEDTLS_ERR_PK_ALLOC_FAILED</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ERR_PK_ALLOC_FAILED       -16256 /**< Memory allocation failed. */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ERR_PK_TYPE_MISMATCH">Marco <span>MBEDTLS_ERR_PK_TYPE_MISMATCH</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ERR_PK_TYPE_MISMATCH      -16128 /**< Type mismatch, eg attempt to encrypt with an ECDSA key */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ERR_PK_BAD_INPUT_DATA">Marco <span>MBEDTLS_ERR_PK_BAD_INPUT_DATA</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ERR_PK_BAD_INPUT_DATA     -3E80 /**< Bad input parameters to function. */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ERR_PK_FILE_IO_ERROR">Marco <span>MBEDTLS_ERR_PK_FILE_IO_ERROR</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ERR_PK_FILE_IO_ERROR      -3E00 /**< Read/write of file failed. */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ERR_PK_KEY_INVALID_VERSION">Marco <span>MBEDTLS_ERR_PK_KEY_INVALID_VERSION</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ERR_PK_KEY_INVALID_VERSION -3D80 /**< Unsupported key version */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ERR_PK_KEY_INVALID_FORMAT">Marco <span>MBEDTLS_ERR_PK_KEY_INVALID_FORMAT</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ERR_PK_KEY_INVALID_FORMAT -3D00 /**< Invalid key tag or value. */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ERR_PK_UNKNOWN_PK_ALG">Marco <span>MBEDTLS_ERR_PK_UNKNOWN_PK_ALG</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ERR_PK_UNKNOWN_PK_ALG     -3C80 /**< Key algorithm is unsupported (only RSA and EC are supported). */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ERR_PK_PASSWORD_REQUIRED">Marco <span>MBEDTLS_ERR_PK_PASSWORD_REQUIRED</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ERR_PK_PASSWORD_REQUIRED  -3C00 /**< Private key password can't be empty. */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ERR_PK_PASSWORD_MISMATCH">Marco <span>MBEDTLS_ERR_PK_PASSWORD_MISMATCH</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ERR_PK_PASSWORD_MISMATCH  -3B80 /**< Given private key password does not allow for correct decryption. */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ERR_PK_INVALID_PUBKEY">Marco <span>MBEDTLS_ERR_PK_INVALID_PUBKEY</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ERR_PK_INVALID_PUBKEY     -3B00 /**< The pubkey tag or value is invalid (only RSA and EC are supported). */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ERR_PK_INVALID_ALG">Marco <span>MBEDTLS_ERR_PK_INVALID_ALG</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ERR_PK_INVALID_ALG        -3A80 /**< The algorithm tag or value is invalid. */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ERR_PK_UNKNOWN_NAMED_CURVE">Marco <span>MBEDTLS_ERR_PK_UNKNOWN_NAMED_CURVE</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ERR_PK_UNKNOWN_NAMED_CURVE -3A00 /**< Elliptic curve is unsupported (only NIST curves are supported). */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ERR_PK_FEATURE_UNAVAILABLE">Marco <span>MBEDTLS_ERR_PK_FEATURE_UNAVAILABLE</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ERR_PK_FEATURE_UNAVAILABLE -14720 /**< Unavailable feature, e.g. RSA disabled for RSA key. */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ERR_PK_SIG_LEN_MISMATCH">Marco <span>MBEDTLS_ERR_PK_SIG_LEN_MISMATCH</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ERR_PK_SIG_LEN_MISMATCH   -14592 /**< The buffer contains a valid signature followed by more data. */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ERR_PK_HW_ACCEL_FAILED">Marco <span>MBEDTLS_ERR_PK_HW_ACCEL_FAILED</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ERR_PK_HW_ACCEL_FAILED    -14464 /**< PK hardware accelerator failed. */
</code></pre>
      <pre class="doc-comment">/* MBEDTLS_ERR_PK_HW_ACCEL_FAILED is deprecated and should not be used. */</pre>

      <h4 id="MBEDTLS_PK_DEBUG_MAX_ITEMS">Marco <span>MBEDTLS_PK_DEBUG_MAX_ITEMS</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_PK_DEBUG_MAX_ITEMS 3
</code></pre>
      <pre class="doc-comment">/** Maximum number of item send for debugging, plus 1 */</pre>
      <h3 id="functions">Functions</h3>
      

      <h4 id="mbedtls_pk_init">Func <span>mbedtls_pk_init</span></h4>
      <pre class="doc-declare"><code>void mbedtls_pk_init( mbedtls_pk_context *ctx );</code></pre>
      <pre class="doc-comment">/**
 * \brief           Initialize a #mbedtls_pk_context (as NONE).
 *
 * \param ctx       The context to initialize.
 *                  This must not be \c NULL.
 */</pre>

      <h4 id="mbedtls_pk_free">Func <span>mbedtls_pk_free</span></h4>
      <pre class="doc-declare"><code>void mbedtls_pk_free( mbedtls_pk_context *ctx );</code></pre>
      <pre class="doc-comment">/**
 * \brief           Free the components of a #mbedtls_pk_context.
 *
 * \param ctx       The context to clear. It must have been initialized.
 *                  If this is \c NULL, this function does nothing.
 */</pre>

      <h4 id="mbedtls_pk_restart_init">Func <span>mbedtls_pk_restart_init</span></h4>
      <pre class="doc-declare"><code>void mbedtls_pk_restart_init( mbedtls_pk_restart_ctx *ctx );</code></pre>
      <pre class="doc-comment">/**
 * \brief           Initialize a restart context
 *
 * \param ctx       The context to initialize.
 *                  This must not be \c NULL.
 */</pre>

      <h4 id="mbedtls_pk_restart_free">Func <span>mbedtls_pk_restart_free</span></h4>
      <pre class="doc-declare"><code>void mbedtls_pk_restart_free( mbedtls_pk_restart_ctx *ctx );</code></pre>
      <pre class="doc-comment">/**
 * \brief           Free the components of a restart context
 *
 * \param ctx       The context to clear. It must have been initialized.
 *                  If this is \c NULL, this function does nothing.
 */</pre>

      <h4 id="mbedtls_pk_setup">Func <span>mbedtls_pk_setup</span></h4>
      <pre class="doc-declare"><code>int mbedtls_pk_setup( mbedtls_pk_context *ctx, const mbedtls_pk_info_t *info );</code></pre>
      <pre class="doc-comment">/**
 * \brief           Initialize a PK context with the information given
 *                  and allocates the type-specific PK subcontext.
 *
 * \param ctx       Context to initialize. It must not have been set
 *                  up yet (type #MBEDTLS_PK_NONE).
 * \param info      Information to use
 *
 * \return          0 on success,
 *                  MBEDTLS_ERR_PK_BAD_INPUT_DATA on invalid input,
 *                  MBEDTLS_ERR_PK_ALLOC_FAILED on allocation failure.
 *
 * \note            For contexts holding an RSA-alt key, use
 *                  \c mbedtls_pk_setup_rsa_alt() instead.
 */</pre>

      <h4 id="mbedtls_pk_setup_rsa_alt">Func <span>mbedtls_pk_setup_rsa_alt</span></h4>
      <pre class="doc-declare"><code>int mbedtls_pk_setup_rsa_alt( mbedtls_pk_context *ctx, void * key,
                        mbedtls_pk_rsa_alt_decrypt_func decrypt_func,
                        mbedtls_pk_rsa_alt_sign_func sign_func,
                        mbedtls_pk_rsa_alt_key_len_func key_len_func );</code></pre>
      <pre class="doc-comment">/**
 * \brief           Initialize an RSA-alt context
 *
 * \param ctx       Context to initialize. It must not have been set
 *                  up yet (type #MBEDTLS_PK_NONE).
 * \param key       RSA key pointer
 * \param decrypt_func  Decryption function
 * \param sign_func     Signing function
 * \param key_len_func  Function returning key length in bytes
 *
 * \return          0 on success, or MBEDTLS_ERR_PK_BAD_INPUT_DATA if the
 *                  context wasn't already initialized as RSA_ALT.
 *
 * \note            This function replaces \c mbedtls_pk_setup() for RSA-alt.
 */</pre>

      <h4 id="mbedtls_pk_get_bitlen">Func <span>mbedtls_pk_get_bitlen</span></h4>
      <pre class="doc-declare"><code>size_t mbedtls_pk_get_bitlen( const mbedtls_pk_context *ctx );</code></pre>
      <pre class="doc-comment">/**
 * \brief           Get the size in bits of the underlying key
 *
 * \param ctx       The context to query. It must have been initialized.
 *
 * \return          Key size in bits, or 0 on error
 */</pre>

      <h4 id="mbedtls_pk_can_do">Func <span>mbedtls_pk_can_do</span></h4>
      <pre class="doc-declare"><code>int mbedtls_pk_can_do( const mbedtls_pk_context *ctx, mbedtls_pk_type_t type );</code></pre>
      <pre class="doc-comment">/**
 * \brief           Tell if a context can do the operation given by type
 *
 * \param ctx       The context to query. It must have been initialized.
 * \param type      The desired type.
 *
 * \return          1 if the context can do operations on the given type.
 * \return          0 if the context cannot do the operations on the given
 *                  type. This is always the case for a context that has
 *                  been initialized but not set up, or that has been
 *                  cleared with mbedtls_pk_free().
 */</pre>

      <h4 id="mbedtls_pk_verify">Func <span>mbedtls_pk_verify</span></h4>
      <pre class="doc-declare"><code>int mbedtls_pk_verify( mbedtls_pk_context *ctx, mbedtls_md_type_t md_alg,
              const unsigned char *hash, size_t hash_len,
              const unsigned char *sig, size_t sig_len );</code></pre>
      <pre class="doc-comment">/**
 * \brief           Verify signature (including padding if relevant).
 *
 * \param ctx       The PK context to use. It must have been set up.
 * \param md_alg    Hash algorithm used (see notes)
 * \param hash      Hash of the message to sign
 * \param hash_len  Hash length or 0 (see notes)
 * \param sig       Signature to verify
 * \param sig_len   Signature length
 *
 * \return          0 on success (signature is valid),
 *                  #MBEDTLS_ERR_PK_SIG_LEN_MISMATCH if there is a valid
 *                  signature in sig but its length is less than \p siglen,
 *                  or a specific error code.
 *
 * \note            For RSA keys, the default padding type is PKCS#1 v1.5.
 *                  Use \c mbedtls_pk_verify_ext( MBEDTLS_PK_RSASSA_PSS, ... )
 *                  to verify RSASSA_PSS signatures.
 *
 * \note            If hash_len is 0, then the length associated with md_alg
 *                  is used instead, or an error returned if it is invalid.
 *
 * \note            md_alg may be MBEDTLS_MD_NONE, only if hash_len != 0
 */</pre>

      <h4 id="mbedtls_pk_verify_restartable">Func <span>mbedtls_pk_verify_restartable</span></h4>
      <pre class="doc-declare"><code>int mbedtls_pk_verify_restartable( mbedtls_pk_context *ctx,
              mbedtls_md_type_t md_alg,
              const unsigned char *hash, size_t hash_len,
              const unsigned char *sig, size_t sig_len,
              mbedtls_pk_restart_ctx *rs_ctx );</code></pre>
      <pre class="doc-comment">/**
 * \brief           Restartable version of \c mbedtls_pk_verify()
 *
 * \note            Performs the same job as \c mbedtls_pk_verify(), but can
 *                  return early and restart according to the limit set with
 *                  \c mbedtls_ecp_set_max_ops() to reduce blocking for ECC
 *                  operations. For RSA, same as \c mbedtls_pk_verify().
 *
 * \param ctx       The PK context to use. It must have been set up.
 * \param md_alg    Hash algorithm used (see notes)
 * \param hash      Hash of the message to sign
 * \param hash_len  Hash length or 0 (see notes)
 * \param sig       Signature to verify
 * \param sig_len   Signature length
 * \param rs_ctx    Restart context (NULL to disable restart)
 *
 * \return          See \c mbedtls_pk_verify(), or
 * \return          #MBEDTLS_ERR_ECP_IN_PROGRESS if maximum number of
 *                  operations was reached: see \c mbedtls_ecp_set_max_ops().
 */</pre>

      <h4 id="mbedtls_pk_verify_ext">Func <span>mbedtls_pk_verify_ext</span></h4>
      <pre class="doc-declare"><code>int mbedtls_pk_verify_ext( mbedtls_pk_type_t type, const void *options,
                  mbedtls_pk_context *ctx, mbedtls_md_type_t md_alg,
                  const unsigned char *hash, size_t hash_len,
                  const unsigned char *sig, size_t sig_len );</code></pre>
      <pre class="doc-comment">/**
 * \brief           Verify signature, with options.
 *                  (Includes verification of the padding depending on type.)
 *
 * \param type      Signature type (inc. possible padding type) to verify
 * \param options   Pointer to type-specific options, or NULL
 * \param ctx       The PK context to use. It must have been set up.
 * \param md_alg    Hash algorithm used (see notes)
 * \param hash      Hash of the message to sign
 * \param hash_len  Hash length or 0 (see notes)
 * \param sig       Signature to verify
 * \param sig_len   Signature length
 *
 * \return          0 on success (signature is valid),
 *                  #MBEDTLS_ERR_PK_TYPE_MISMATCH if the PK context can't be
 *                  used for this type of signatures,
 *                  #MBEDTLS_ERR_PK_SIG_LEN_MISMATCH if there is a valid
 *                  signature in sig but its length is less than \p siglen,
 *                  or a specific error code.
 *
 * \note            If hash_len is 0, then the length associated with md_alg
 *                  is used instead, or an error returned if it is invalid.
 *
 * \note            md_alg may be MBEDTLS_MD_NONE, only if hash_len != 0
 *
 * \note            If type is MBEDTLS_PK_RSASSA_PSS, then options must point
 *                  to a mbedtls_pk_rsassa_pss_options structure,
 *                  otherwise it must be NULL.
 */</pre>

      <h4 id="mbedtls_pk_sign">Func <span>mbedtls_pk_sign</span></h4>
      <pre class="doc-declare"><code>int mbedtls_pk_sign( mbedtls_pk_context *ctx, mbedtls_md_type_t md_alg,
            const unsigned char *hash, size_t hash_len,
            unsigned char *sig, size_t *sig_len,
            int (*f_rng)(void *, unsigned char *, size_t), void *p_rng );</code></pre>
      <pre class="doc-comment">/**
 * \brief           Make signature, including padding if relevant.
 *
 * \param ctx       The PK context to use. It must have been set up
 *                  with a private key.
 * \param md_alg    Hash algorithm used (see notes)
 * \param hash      Hash of the message to sign
 * \param hash_len  Hash length or 0 (see notes)
 * \param sig       Place to write the signature
 * \param sig_len   Number of bytes written
 * \param f_rng     RNG function
 * \param p_rng     RNG parameter
 *
 * \return          0 on success, or a specific error code.
 *
 * \note            For RSA keys, the default padding type is PKCS#1 v1.5.
 *                  There is no interface in the PK module to make RSASSA-PSS
 *                  signatures yet.
 *
 * \note            If hash_len is 0, then the length associated with md_alg
 *                  is used instead, or an error returned if it is invalid.
 *
 * \note            For RSA, md_alg may be MBEDTLS_MD_NONE if hash_len != 0.
 *                  For ECDSA, md_alg may never be MBEDTLS_MD_NONE.
 */</pre>

      <h4 id="mbedtls_pk_sign_restartable">Func <span>mbedtls_pk_sign_restartable</span></h4>
      <pre class="doc-declare"><code>int mbedtls_pk_sign_restartable( mbedtls_pk_context *ctx,
            mbedtls_md_type_t md_alg,
            const unsigned char *hash, size_t hash_len,
            unsigned char *sig, size_t *sig_len,
            int (*f_rng)(void *, unsigned char *, size_t), void *p_rng,
            mbedtls_pk_restart_ctx *rs_ctx );</code></pre>
      <pre class="doc-comment">/**
 * \brief           Restartable version of \c mbedtls_pk_sign()
 *
 * \note            Performs the same job as \c mbedtls_pk_sign(), but can
 *                  return early and restart according to the limit set with
 *                  \c mbedtls_ecp_set_max_ops() to reduce blocking for ECC
 *                  operations. For RSA, same as \c mbedtls_pk_sign().
 *
 * \param ctx       The PK context to use. It must have been set up
 *                  with a private key.
 * \param md_alg    Hash algorithm used (see notes)
 * \param hash      Hash of the message to sign
 * \param hash_len  Hash length or 0 (see notes)
 * \param sig       Place to write the signature
 * \param sig_len   Number of bytes written
 * \param f_rng     RNG function
 * \param p_rng     RNG parameter
 * \param rs_ctx    Restart context (NULL to disable restart)
 *
 * \return          See \c mbedtls_pk_sign(), or
 * \return          #MBEDTLS_ERR_ECP_IN_PROGRESS if maximum number of
 *                  operations was reached: see \c mbedtls_ecp_set_max_ops().
 */</pre>

      <h4 id="mbedtls_pk_decrypt">Func <span>mbedtls_pk_decrypt</span></h4>
      <pre class="doc-declare"><code>int mbedtls_pk_decrypt( mbedtls_pk_context *ctx,
               const unsigned char *input, size_t ilen,
               unsigned char *output, size_t *olen, size_t osize,
               int (*f_rng)(void *, unsigned char *, size_t), void *p_rng );</code></pre>
      <pre class="doc-comment">/**
 * \brief           Decrypt message (including padding if relevant).
 *
 * \param ctx       The PK context to use. It must have been set up
 *                  with a private key.
 * \param input     Input to decrypt
 * \param ilen      Input size
 * \param output    Decrypted output
 * \param olen      Decrypted message length
 * \param osize     Size of the output buffer
 * \param f_rng     RNG function
 * \param p_rng     RNG parameter
 *
 * \note            For RSA keys, the default padding type is PKCS#1 v1.5.
 *
 * \return          0 on success, or a specific error code.
 */</pre>

      <h4 id="mbedtls_pk_encrypt">Func <span>mbedtls_pk_encrypt</span></h4>
      <pre class="doc-declare"><code>int mbedtls_pk_encrypt( mbedtls_pk_context *ctx,
               const unsigned char *input, size_t ilen,
               unsigned char *output, size_t *olen, size_t osize,
               int (*f_rng)(void *, unsigned char *, size_t), void *p_rng );</code></pre>
      <pre class="doc-comment">/**
 * \brief           Encrypt message (including padding if relevant).
 *
 * \param ctx       The PK context to use. It must have been set up.
 * \param input     Message to encrypt
 * \param ilen      Message size
 * \param output    Encrypted output
 * \param olen      Encrypted output length
 * \param osize     Size of the output buffer
 * \param f_rng     RNG function
 * \param p_rng     RNG parameter
 *
 * \note            For RSA keys, the default padding type is PKCS#1 v1.5.
 *
 * \return          0 on success, or a specific error code.
 */</pre>

      <h4 id="mbedtls_pk_check_pair">Func <span>mbedtls_pk_check_pair</span></h4>
      <pre class="doc-declare"><code>int mbedtls_pk_check_pair( const mbedtls_pk_context *pub, const mbedtls_pk_context *prv );</code></pre>
      <pre class="doc-comment">/**
 * \brief           Check if a public-private pair of keys matches.
 *
 * \param pub       Context holding a public key.
 * \param prv       Context holding a private (and public) key.
 *
 * \return          0 on success or MBEDTLS_ERR_PK_BAD_INPUT_DATA
 */</pre>

      <h4 id="mbedtls_pk_debug">Func <span>mbedtls_pk_debug</span></h4>
      <pre class="doc-declare"><code>int mbedtls_pk_debug( const mbedtls_pk_context *ctx, mbedtls_pk_debug_item *items );</code></pre>
      <pre class="doc-comment">/**
 * \brief           Export debug information
 *
 * \param ctx       The PK context to use. It must have been initialized.
 * \param items     Place to write debug items
 *
 * \return          0 on success or MBEDTLS_ERR_PK_BAD_INPUT_DATA
 */</pre>

      <h4 id="mbedtls_pk_parse_key">Func <span>mbedtls_pk_parse_key</span></h4>
      <pre class="doc-declare"><code>int mbedtls_pk_parse_key( mbedtls_pk_context *ctx,
                 const unsigned char *key, size_t keylen,
                 const unsigned char *pwd, size_t pwdlen );</code></pre>
      <pre class="doc-comment">/**
 * \brief           Parse a private key in PEM or DER format
 *
 * \param ctx       The PK context to fill. It must have been initialized
 *                  but not set up.
 * \param key       Input buffer to parse.
 *                  The buffer must contain the input exactly, with no
 *                  extra trailing material. For PEM, the buffer must
 *                  contain a null-terminated string.
 * \param keylen    Size of \b key in bytes.
 *                  For PEM data, this includes the terminating null byte,
 *                  so \p keylen must be equal to `strlen(key) + 1`.
 * \param pwd       Optional password for decryption.
 *                  Pass \c NULL if expecting a non-encrypted key.
 *                  Pass a string of \p pwdlen bytes if expecting an encrypted
 *                  key; a non-encrypted key will also be accepted.
 *                  The empty password is not supported.
 * \param pwdlen    Size of the password in bytes.
 *                  Ignored if \p pwd is \c NULL.
 *
 * \note            On entry, ctx must be empty, either freshly initialised
 *                  with mbedtls_pk_init() or reset with mbedtls_pk_free(). If you need a
 *                  specific key type, check the result with mbedtls_pk_can_do().
 *
 * \note            The key is also checked for correctness.
 *
 * \return          0 if successful, or a specific PK or PEM error code
 */</pre>

      <h4 id="mbedtls_pk_parse_public_key">Func <span>mbedtls_pk_parse_public_key</span></h4>
      <pre class="doc-declare"><code>int mbedtls_pk_parse_public_key( mbedtls_pk_context *ctx,
                        const unsigned char *key, size_t keylen );</code></pre>
      <pre class="doc-comment">/**
 * \brief           Parse a public key in PEM or DER format
 *
 * \param ctx       The PK context to fill. It must have been initialized
 *                  but not set up.
 * \param key       Input buffer to parse.
 *                  The buffer must contain the input exactly, with no
 *                  extra trailing material. For PEM, the buffer must
 *                  contain a null-terminated string.
 * \param keylen    Size of \b key in bytes.
 *                  For PEM data, this includes the terminating null byte,
 *                  so \p keylen must be equal to `strlen(key) + 1`.
 *
 * \note            On entry, ctx must be empty, either freshly initialised
 *                  with mbedtls_pk_init() or reset with mbedtls_pk_free(). If you need a
 *                  specific key type, check the result with mbedtls_pk_can_do().
 *
 * \note            The key is also checked for correctness.
 *
 * \return          0 if successful, or a specific PK or PEM error code
 */</pre>

      <h4 id="mbedtls_pk_parse_keyfile">Func <span>mbedtls_pk_parse_keyfile</span></h4>
      <pre class="doc-declare"><code>int mbedtls_pk_parse_keyfile( mbedtls_pk_context *ctx,
                     const char *path, const char *password );</code></pre>
      <pre class="doc-comment">/**
 * \brief           Load and parse a private key
 *
 * \param ctx       The PK context to fill. It must have been initialized
 *                  but not set up.
 * \param path      filename to read the private key from
 * \param password  Optional password to decrypt the file.
 *                  Pass \c NULL if expecting a non-encrypted key.
 *                  Pass a null-terminated string if expecting an encrypted
 *                  key; a non-encrypted key will also be accepted.
 *                  The empty password is not supported.
 *
 * \note            On entry, ctx must be empty, either freshly initialised
 *                  with mbedtls_pk_init() or reset with mbedtls_pk_free(). If you need a
 *                  specific key type, check the result with mbedtls_pk_can_do().
 *
 * \note            The key is also checked for correctness.
 *
 * \return          0 if successful, or a specific PK or PEM error code
 */</pre>

      <h4 id="mbedtls_pk_parse_public_keyfile">Func <span>mbedtls_pk_parse_public_keyfile</span></h4>
      <pre class="doc-declare"><code>int mbedtls_pk_parse_public_keyfile( mbedtls_pk_context *ctx, const char *path );</code></pre>
      <pre class="doc-comment">/**
 * \brief           Load and parse a public key
 *
 * \param ctx       The PK context to fill. It must have been initialized
 *                  but not set up.
 * \param path      filename to read the public key from
 *
 * \note            On entry, ctx must be empty, either freshly initialised
 *                  with mbedtls_pk_init() or reset with mbedtls_pk_free(). If
 *                  you need a specific key type, check the result with
 *                  mbedtls_pk_can_do().
 *
 * \note            The key is also checked for correctness.
 *
 * \return          0 if successful, or a specific PK or PEM error code
 */</pre>

      <h4 id="mbedtls_pk_write_key_der">Func <span>mbedtls_pk_write_key_der</span></h4>
      <pre class="doc-declare"><code>int mbedtls_pk_write_key_der( mbedtls_pk_context *ctx, unsigned char *buf, size_t size );</code></pre>
      <pre class="doc-comment">/**
 * \brief           Write a private key to a PKCS#1 or SEC1 DER structure
 *                  Note: data is written at the end of the buffer! Use the
 *                        return value to determine where you should start
 *                        using the buffer
 *
 * \param ctx       PK context which must contain a valid private key.
 * \param buf       buffer to write to
 * \param size      size of the buffer
 *
 * \return          length of data written if successful, or a specific
 *                  error code
 */</pre>

      <h4 id="mbedtls_pk_write_pubkey_der">Func <span>mbedtls_pk_write_pubkey_der</span></h4>
      <pre class="doc-declare"><code>int mbedtls_pk_write_pubkey_der( mbedtls_pk_context *ctx, unsigned char *buf, size_t size );</code></pre>
      <pre class="doc-comment">/**
 * \brief           Write a public key to a SubjectPublicKeyInfo DER structure
 *                  Note: data is written at the end of the buffer! Use the
 *                        return value to determine where you should start
 *                        using the buffer
 *
 * \param ctx       PK context which must contain a valid public or private key.
 * \param buf       buffer to write to
 * \param size      size of the buffer
 *
 * \return          length of data written if successful, or a specific
 *                  error code
 */</pre>

      <h4 id="mbedtls_pk_write_pubkey_pem">Func <span>mbedtls_pk_write_pubkey_pem</span></h4>
      <pre class="doc-declare"><code>int mbedtls_pk_write_pubkey_pem( mbedtls_pk_context *ctx, unsigned char *buf, size_t size );</code></pre>
      <pre class="doc-comment">/**
 * \brief           Write a public key to a PEM string
 *
 * \param ctx       PK context which must contain a valid public or private key.
 * \param buf       Buffer to write to. The output includes a
 *                  terminating null byte.
 * \param size      Size of the buffer in bytes.
 *
 * \return          0 if successful, or a specific error code
 */</pre>

      <h4 id="mbedtls_pk_write_key_pem">Func <span>mbedtls_pk_write_key_pem</span></h4>
      <pre class="doc-declare"><code>int mbedtls_pk_write_key_pem( mbedtls_pk_context *ctx, unsigned char *buf, size_t size );</code></pre>
      <pre class="doc-comment">/**
 * \brief           Write a private key to a PKCS#1 or SEC1 PEM string
 *
 * \param ctx       PK context which must contain a valid private key.
 * \param buf       Buffer to write to. The output includes a
 *                  terminating null byte.
 * \param size      Size of the buffer in bytes.
 *
 * \return          0 if successful, or a specific error code
 */</pre>

      <h4 id="mbedtls_pk_parse_subpubkey">Func <span>mbedtls_pk_parse_subpubkey</span></h4>
      <pre class="doc-declare"><code>int mbedtls_pk_parse_subpubkey( unsigned char **p, const unsigned char *end,
                       mbedtls_pk_context *pk );</code></pre>
      <pre class="doc-comment">/**
 * \brief           Parse a SubjectPublicKeyInfo DER structure
 *
 * \param p         the position in the ASN.1 data
 * \param end       end of the buffer
 * \param pk        The PK context to fill. It must have been initialized
 *                  but not set up.
 *
 * \return          0 if successful, or a specific PK error code
 */</pre>

      <h4 id="mbedtls_pk_write_pubkey">Func <span>mbedtls_pk_write_pubkey</span></h4>
      <pre class="doc-declare"><code>int mbedtls_pk_write_pubkey( unsigned char **p, unsigned char *start,
                    const mbedtls_pk_context *key );</code></pre>
      <pre class="doc-comment">/**
 * \brief           Write a subjectPublicKey to ASN.1 data
 *                  Note: function works backwards in data buffer
 *
 * \param p         reference to current position pointer
 * \param start     start of the buffer (for bounds-checking)
 * \param key       PK context which must contain a valid public or private key.
 *
 * \return          the length written or a negative error code
 */</pre>

      <h4 id="mbedtls_pk_load_file">Func <span>mbedtls_pk_load_file</span></h4>
      <pre class="doc-declare"><code>int mbedtls_pk_load_file( const char *path, unsigned char **buf, size_t *n );</code></pre>
      <pre class="doc-comment"></pre>
      <h3 id="vars">Vars</h3>
      

      <h4 id="mbedtls_pk_type_t">Variable <span>mbedtls_pk_type_t</span></h4>
      <pre class="doc-declare"><code>mbedtls_pk_type_t mbedtls_pk_get_type( const mbedtls_pk_context *ctx );</code></pre>
      <pre class="doc-comment">/**
 * \brief           Get the key type
 *
 * \param ctx       The PK context to use. It must have been initialized.
 *
 * \return          Type on success.
 * \return          #MBEDTLS_PK_NONE for a context that has not been set up.
 */</pre>
      <h3 id="consts">Consts</h3>
      

      <h4 id=" ">Const <span> </span></h4>
      <pre class="doc-declare"><code>const mbedtls_pk_info_t *mbedtls_pk_info_from_type( mbedtls_pk_type_t pk_type );</code></pre>
      <pre class="doc-comment">/**
 * \brief           Return information associated with the given PK type
 *
 * \param pk_type   PK type to search for.
 *
 * \return          The PK info associated with the type or NULL if not found.
 */</pre>

      <h4 id=" ">Const <span> </span></h4>
      <pre class="doc-declare"><code>const char * mbedtls_pk_get_name( const mbedtls_pk_context *ctx );</code></pre>
      <pre class="doc-comment">/**
 * \brief           Access the type name
 *
 * \param ctx       The PK context to use. It must have been initialized.
 *
 * \return          Type name on success, or "invalid PK"
 */</pre>
      <h3 id="types">Types</h3>
      
      <h3 id="typedefs">Typedefs</h3>
      

      <h4 id="mbedtls_pk_type_t;
">Typedef <span>mbedtls_pk_type_t;
</span></h4>
      <pre class="doc-declare"><code>typedef enum {
   MBEDTLS_PK_NONE=0,
   MBEDTLS_PK_RSA,
   MBEDTLS_PK_ECKEY,
   MBEDTLS_PK_ECKEY_DH,
   MBEDTLS_PK_ECDSA,
   MBEDTLS_PK_RSA_ALT,
   MBEDTLS_PK_RSASSA_PSS,
} mbedtls_pk_type_t;
</code></pre>
      <pre class="doc-comment">/**
 * \brief          Public key types
 */</pre>

      <h4 id="mbedtls_pk_rsassa_pss_options;
">Typedef <span>mbedtls_pk_rsassa_pss_options;
</span></h4>
      <pre class="doc-declare"><code>typedef struct mbedtls_pk_rsassa_pss_options
{
   mbedtls_md_type_t mgf1_hash_id;
   int expected_salt_len;

} mbedtls_pk_rsassa_pss_options;
</code></pre>
      <pre class="doc-comment">/**
 * \brief           Options for RSASSA-PSS signature verification.
 *                  See \c mbedtls_rsa_rsassa_pss_verify_ext()
 */</pre>

      <h4 id="mbedtls_pk_debug_type;
">Typedef <span>mbedtls_pk_debug_type;
</span></h4>
      <pre class="doc-declare"><code>typedef enum
{
   MBEDTLS_PK_DEBUG_NONE = 0,
   MBEDTLS_PK_DEBUG_MPI,
   MBEDTLS_PK_DEBUG_ECP,
} mbedtls_pk_debug_type;
</code></pre>
      <pre class="doc-comment">/**
 * \brief           Types for interfacing with the debug module
 */</pre>

      <h4 id="mbedtls_pk_debug_item;
">Typedef <span>mbedtls_pk_debug_item;
</span></h4>
      <pre class="doc-declare"><code>typedef struct mbedtls_pk_debug_item
{
   mbedtls_pk_debug_type type;
   const char *name;
   void *value;
} mbedtls_pk_debug_item;
</code></pre>
      <pre class="doc-comment">/**
 * \brief           Item to send to the debug module
 */</pre>

      <h4 id="mbedtls_pk_info_t">Typedef <span>mbedtls_pk_info_t</span></h4>
      <pre class="doc-declare"><code>typedef struct mbedtls_pk_info_t mbedtls_pk_info_t;
</code></pre>
      <pre class="doc-comment">/**
 * \brief           Public key information and operations
 */</pre>

      <h4 id="mbedtls_pk_context;
">Typedef <span>mbedtls_pk_context;
</span></h4>
      <pre class="doc-declare"><code>typedef struct mbedtls_pk_context
{
   const mbedtls_pk_info_t *  pk_info; /**< Public key information         */
   void *                     pk_ctx; /**< Underlying public key context  */
} mbedtls_pk_context;
</code></pre>
      <pre class="doc-comment">/**
 * \brief           Public key container
 */</pre>

      <h4 id="mbedtls_pk_restart_ctx;">Typedef <span>mbedtls_pk_restart_ctx;</span></h4>
      <pre class="doc-declare"><code>typedef struct
{
   const mbedtls_pk_info_t *  pk_info; /**< Public key information         */
   void *                     rs_ctx; /**< Underlying restart context     */
} mbedtls_pk_restart_ctx;
#else /* MBEDTLS_ECDSA_C && MBEDTLS_ECP_RESTARTABLE */
/* Now we can declare functions that take a pointer to that */
typedef void mbedtls_pk_restart_ctx;</code></pre>
      <pre class="doc-comment">/**
 * \brief           Context for resuming operations
 */</pre>

      <h4 id="mbedtls_pk_rsa_alt_decrypt_func">Typedef <span>mbedtls_pk_rsa_alt_decrypt_func</span></h4>
      <pre class="doc-declare"><code>typedef int (*mbedtls_pk_rsa_alt_decrypt_func)( void *ctx, int mode, size_t *olen,
                   const unsigned char *input, unsigned char *output,
                   size_t output_max_len );
</code></pre>
      <pre class="doc-comment">/**
 * \brief           Types for RSA-alt abstraction
 */</pre>

      <h4 id="mbedtls_pk_rsa_alt_sign_func">Typedef <span>mbedtls_pk_rsa_alt_sign_func</span></h4>
      <pre class="doc-declare"><code>typedef int (*mbedtls_pk_rsa_alt_sign_func)( void *ctx,
                   int (*f_rng)(void *, unsigned char *, size_t), void *p_rng,
                   int mode, mbedtls_md_type_t md_alg, unsigned int hashlen,
                   const unsigned char *hash, unsigned char *sig );
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="size_t">Typedef <span>size_t</span></h4>
      <pre class="doc-declare"><code>typedef size_t (*mbedtls_pk_rsa_alt_key_len_func)( void *ctx );</code></pre>
      <pre class="doc-comment"></pre>
    </div>
  </body>
</html>
            